﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Media;

namespace Groovy_IM.ViewModels.ChatPage
{
    public class MessageViewModel : INotifyPropertyChanged
    {
        private SolidColorBrush bUserColor;

        public SolidColorBrush BackUserColor
        {
            get { return bUserColor; }
            set { bUserColor = value; NotifyPropertyChanged("BackUserColor"); }
        }

        private string Screenname;

        public string Username
        {
            get { return Screenname; }
            set { Screenname = value; NotifyPropertyChanged("Username"); }
        }

        private string Message;

        public string UserText
        {
            get { return Message; }
            set { Message = value;  NotifyPropertyChanged("UserText"); }
        }
        
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
